# 所有的错误定义


class HzbErrorBase(Exception):
    code = -1
    code_string = ''

    def get_dict(self):
        r_dict = dict()
        r_dict['message'] = self.code_string
        r_dict['status'] = self.code
        return r_dict
    pass


class HzbError10001(HzbErrorBase):
    code = 10001
    code_string = '用户不存在'
    pass


class HzbError10002(HzbErrorBase):
    code = 10002
    code_string = '活动不存在'
    pass


class HzbError10003(HzbErrorBase):
    code = 10003
    code_string = '分享金已被兑完'
    pass


class HzbError10009(HzbErrorBase):
    code = 10009
    code_string = '用户UnionId非法'
    pass


class HzbError10010(HzbErrorBase):
    code = 10010
    code_string = '送多多验签失败，请更新客户端'
    pass